home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2011 November
/
CHIP_2011_11.iso
/
Programy
/
Inne
/
Gry
/
Carnage_Contest
/
scripts
/
CC Original
/
weapons
/
Hellfire.lua
< prev
next >
Wrap
Text File
|
2010-03-06
|
1KB
|
43 lines
--------------------------------------------------------------------------------
-- Weapon Hellfire
-- Original Carnage Contest Weapon
-- Script by DC, September 2009, www.UnrealSoftware.de
--------------------------------------------------------------------------------
-- Setup Tables
if cc==nil then cc={} end
cc.hellfire={}
-- Load & Prepare Ressources
cc.hellfire.gfx_wpn=loadgfx("weapons/hellfire.png") -- Weapon Image
setmidhandle(cc.hellfire.gfx_wpn)
cc.hellfire.sfx_attack=loadsfx("hellfire.ogg") -- Hellfire Sound
--------------------------------------------------------------------------------
-- Weapon: Hellfire
--------------------------------------------------------------------------------
cc.hellfire.id=addweapon("cc.hellfire","Hellfire",cc.hellfire.gfx_wpn,0,2) -- Add Weapon (0 uses, first in round 2)
function cc.hellfire.draw() -- Draw
-- do nothing
end
function cc.hellfire.attack(attack) -- Attack
if (weapon_shots<=0) then
if (attack==1) then
-- No more weapon switching!
useweapon(0)
weapon_shots=weapon_shots+1
-- Effect
playsound(cc.hellfire.sfx_attack)
setbgcolor(255,50,0,1.0,0.005)
-- Fire
for x=0,getmapwidth(),50 do
createobject(o_fire,x,-100)
end
-- End Turn
endturn()
end
end
end